package r5.pierwszy.raz;

import java.util.ArrayList;
import java.util.List;

public class ListaStringow {

	public static void main(String[] args) {

		List<String> list = new ArrayList<String>(10);
		
//		System.out.println(list.size());
//		System.out.println(list.isEmpty());

		list.add("Monika");
		list.add("Edyta");
		list.add("Beata");
		list.add("Kasia");
		list.add("Ewa");
		for(String e : list)
			System.out.println(e);
		System.out.println();
		list.add(3, "Dorota");
		for(String e : list)
			System.out.println(e);
		System.out.println();
		if(list.contains("Edyta"))
			list.remove("Edyta");
		for(String e : list)
			System.out.println(e);
		System.out.println();
		list.remove(0);
		list.set(2, "Monika");
		for(String e : list)
			System.out.println(e);
		System.out.println();
		
	}

}
